<?php 

include '../utils/stock.php';
include '../utils/evaluator.php';
require('../utils/fpdf17/fpdf.php');
session_start() ;
?>
<html>
<head>
<style type="text/css">
body
{

font-family:"Calibri";}
}
</style>
</head>
<body>

<b>Income statement (2 of 2)</b>
<br>

<br>
Figures saved.

<?php

$stock = new stock;

$stock->get_stock_quote($_SESSION['evaluator']->ticker);
$netincome = $_POST["netincome"];
$shares = $_POST["shares"];
$div = $_POST["div"];
$fed = $_POST["fednote"];
$eps = $netincome/$shares;

//echo "<b>Net income: </b>";
//echo $netincome;
//echo "<br>";
//echo "<b>Shares: </b>";
//echo $shares;
//echo "<br>";
//echo "<b>Dividend: </b>";
//echo $div;
//echo "<br>";
//echo "<b>Federal note: </b>";
//echo $fed;
//echo "<br>";
//echo "<br>";
//echo "<b>Earnings per Share: </b>";
//echo $eps;
//echo "<br>";
//echo "<b>Earnings per Share (Source Yahoo Finance): </b>";
//echo $stock->eps;
//echo "<br>";
//echo "<b>Dividend on EPS (%): </b>";
//echo $div/$eps;
//echo "<br>";
//echo "<b>Return on equity (%): </b>";
//echo $netincome/$_SESSION['equity'];
//echo "<br>";
//
//echo "<br>";
//echo "<br>";
//echo "Proceed if these numbers are correct, otherwise go back.";

$evaluator = $_SESSION['evaluator'];
$evaluator->net_income = $netincome;
$evaluator->eps = $eps;
$evaluator->nb_shares = $shares;
$evaluator->anualised_dividend = $div;
$evaluator->federal_note = $fed;
$evaluator->roe =  $netincome/$evaluator->total_equity;
$_SESSION['evaluator'] = $evaluator;

?>
<br />
<button type="button" onclick="location.href='step4.php'">Back</button>
<button type="button" onclick="location.href='step5.php'">Next</button>



</body>
</html> 